
namespace CSharpPro._1027;
public class Father
{
    public void FatherMethod()
    {
        Console.WriteLine("父亲的方法");
    }
}
public class Child : Father
{
    public void ChildMethod()
    {
        Console.WriteLine("孩子的方法");
    }
}
public class Son : Father
{
    public void SonMethod()
    {
        Console.WriteLine("儿子的方法");
    }
}
public class Demo
{
    public static void main(string[] args)
    {
    ;
        
        Child child = new Child();
        child.FatherMethod();
        child.ChildMethod();

        Son son = new Son();
        son.FatherMethod();
        son.SonMethod();
    }
}
